{% extends "base.html" %} {% block title %}User Management{% endblock %} {% block content %}

Users

{% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, msg in messages %}
{{ msg }}
{% endfor %} {% endif %} {% endwith %}

Add User

{% set columns = [ ('user_id', 'ID'), ('username', 'Username'), ('email', 'Email'), ('full_name', 'Full Name'), ('role', 'Role'), ('created_at', 'Created At') ] %} {% for field, label in columns %} {% endfor %} {% for user in users %} {% endfor %}
{{ label }} {% if sort == field %} {{ '↑' if direction == 'asc' else '↓' }} {% endif %} Actions
{{ user.user_id }} {{ user.username }} {{ user.email }} {{ user.employee.first_name }} {{ user.employee.last_name or 'SYSTEM'}} {{ user.role }} {{ user.created_at.strftime('%Y-%m-%d') if user.created_at else '—' }} {% if user.user_id > 1 %} Delete {% endif %}
{% if user.user_id > 1 %}
{% endif %}
{% endblock %}